package day07;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Stream;

public class homework02 {
	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<String>();
		Collections.addAll(list, "张无忌-男-15", "周芷若-女-14", "赵敏-女-13", "张强-男-20", "张三丰-男-100", "张翠山-男-40","张良-男-35","王二麻子-男-35","谢广坤-女-41","林婷-女-22","林立-女-23");
		Stream<String> nan = list.stream().filter(s->"男".equals(s.split("-")[1])).filter(s->s.split("-")[0].length()==3).limit(3);
		Stream<String> nv = list.stream().filter(s->s.startsWith("林")).skip(1);
		Stream.concat(nan, nv).distinct().forEach(s->System.out.println(s));
	}
}
